package com.foo.mapper;

import com.foo.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysUserMapper
{
    /**查询全部用户*/
    @Select("select * from sys_user")
    List<SysUser> queryAll();

    /**查询用户详细信息*/
    @Select("select * from sys_user where user_id=#{Id}")
    SysUser selectInfo(Long Id);

    /**登录 */
    @Select("select * from sys_user where user_name=#{username} and password = #{password}")
    SysUser login(@Param("username") String username,@Param("password") String password);
}
